#ifndef __E_SHA1_H__
#define __E_SHA1_H__

//#include <Windows.h>
typedef struct sha1_state_s 
{
    unsigned int H[5];
    unsigned int W[80];
    int  lenW;
    unsigned int sizeHi;
    unsigned int sizeLo;
} sha1_state_t;

void sha1_init( sha1_state_t* ctx );
void sha1_append( sha1_state_t* ctx, unsigned char* dataIn, int len );
void sha1_finish( sha1_state_t* ctx, unsigned char hashout[20] );
void sha1_hash( unsigned char* dataIn, int len, unsigned char hashout[20] );

#define SHA_ROTL(X,n) ((((X) << (n)) | ((X) >> (32-(n)))) & 0xFFFFFFFFU)
void sha1_hashblock( sha1_state_t* ctx );

#endif
